import settings
from django.conf.urls.defaults import *

urlpatterns = patterns('main.views',
    (r'^$',             'system.index'),
    (r'^loading/$',     'system.loading'),
    (r'^login/$',       'system.user_login'),
    (r'^logout/$',      'system.user_logout'),
    (r'^register/$',    'system.user_register'),
    (r'^session',       'system.store_session'),
    (r'^sys/restart/$', 'system.restart'),
    (r'^sys/update/$',  'system.update'),
    (r'^search',        'search.search_products'),
)

if settings.LOCAL or settings.TEST:
    urlpatterns += patterns('',
        (r'^.*?(?P<name>.*\.html)$', 'main.views.system.show_template')
    )
